//package lvxu.service;
//
//
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//
//import java.util.List;
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = {"classpath:spring.xml"})
//@Service
//public class CollectListService {
//    @Autowired
//    CollectListMapper collectListMapper;
//    //查询所有歌曲信息
//    public List<CollectList> selectByUserId(Integer userid) {
//        CollectListExample collectListExample = new CollectListExample();
//        CollectListExample.Criteria criteria = collectListExample.createCriteria();
//        criteria.andUseridEqualTo(userid);
//        List<CollectList> collectlistList = collectListMapper.selectByExample(collectListExample);
////        System.out.println(musicList);
//        return  collectlistList;
//    }
//
//    public void insertCollectList(CollectList collectList) {
//        collectListMapper.insert(collectList);
//    }
//
//    public void deleteCollectList(Integer musicid) {
//        CollectListExample collectListExample = new CollectListExample();
//        CollectListExample.Criteria criteria = collectListExample.createCriteria();
//        criteria.andMusicidEqualTo(musicid);
//        collectListMapper.deleteByExample(collectListExample);
//    }
//
//    public void deleteById(Integer del_id) {
//        CollectListExample collectListExample = new CollectListExample();
//        CollectListExample.Criteria criteria = collectListExample.createCriteria();
//        criteria.andMusicidEqualTo(del_id);
//        collectListMapper.deleteByExample(collectListExample);
//    }
//
////    //通过kind查询歌曲信息
////    public List<Music> selectByKind(Integer kind) {
////        MusicExample musicExample = new MusicExample();
////        MusicExample.Criteria criteria = musicExample.createCriteria();
////        criteria.andKindEqualTo(kind);
////        List<Music> musicList = musicMapper.selectByExample(musicExample);
////        return musicList;
////    }
//}
